﻿using System.Collections.Generic;
using System.ComponentModel.Composition;
using System.Linq;
using System.Web.Mvc;
using Mefisto4.BusinessObjects;
using Mefisto4.Core.Models;

namespace Mefisto4.Controllers
{
    [Export]
    [PartCreationPolicy(CreationPolicy.NonShared)]
    public class TestController : Controller
    {
        public ActionResult Index()
        {
            var users = new List<SimpleUser>();

            using (var business = new UserBusiness())
            {
                users = business.GetUsers().ToList();
            }

            ViewBag.Message = "Et voilà, ce test est dans le site par défaut !";
            return View(users);
        }
    }
}
